package com.hutianao.gqgl.information.internationalPrice.control;

import com.hutianao.gqgl.information.internationalPrice.entity.SearchInternationalPriceEntity;
import com.hutianao.gqgl.information.internationalPrice.service.InternationalPriceService;
import com.hutianao.gqgl.mybatis.entity.InternationalPriceEntity;
import com.hutianao.gqgl.mybatis.flexigrid.PaddingEntity;
import com.hutianao.gqgl.mybatis.flexigrid.PadingRstType;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Controller
@RequestMapping("/information/internationalPrice")
public class InternationalPriceController {
    private Logger logger = LogManager.getLogger(this.getClass());
    @Resource
    private InternationalPriceService internationalPriceService;
    @RequestMapping("/informationPage")
    public String informationPage(){
        return "information/internationalPrice/informationPage";
    }
    @RequestMapping("/queryInternationalPriceInfoListByPage")
    @ResponseBody
    public PadingRstType<InternationalPriceEntity> queryInternationalPriceInfoListByPage(SearchInternationalPriceEntity search, PaddingEntity padding){
        logger.info(search);
        logger.info(padding);
        PadingRstType<InternationalPriceEntity> padingRstType = internationalPriceService.queryInternationalPriceInfoListByPage(search,padding);
        return padingRstType;
    }
    @RequestMapping("/403")
    public String show403() {
        return "/error/403";
    }
}
